<template>
  <div id="app">
    <router-view/>
    <div class="bottomBar">
      <div @click="clickBtn('helloWorld')" v-bind:class="{'clickBtnBk':clickBtnBk == 'helloWorld'}"><router-link to="/HelloWorld">首页</router-link></div>
      <div @click="clickBtn('secondPage')" v-bind:class="{'clickBtnBk':clickBtnBk == 'secondPage'}"><router-link to="/SecondPage">二页</router-link></div>
      <div @click="clickBtn('threePage')" v-bind:class="{'clickBtnBk':clickBtnBk == 'threePage'}"><router-link to="/ThreePage">三页</router-link></div>
    </div>
  </div>
</template>

<script>
//  require('!style-loader!css-loader!less-loader!./assets/css/main.less')
export default {
  name: 'app',
  data () {
    return {
      clickBtnBk: 'helloWorld',
      targetDom: false
    }
  },
  methods: {
    clickBtn: function (dom) {
      this.clickBtnBk = dom
    }
  }
}
</script>

<style lang="less">
  @import "./css/index.less";
  .clickBtnBk{
       background-color:yellowgreen;
  }

</style>
